//OrderClient.java
package decorator.printinvoice;

import java.util.Date;

/**
 *@author:youtubezou
 *@version:2012-7-25
 */
public class OrderClient {
	public static void main(String[] args){
		Order order = new SaleOrder();
		
		order.setCustomerName("youtubezou");
		order.setSalesDate(new Date());
		
		OrderLine line1 = new OrderLine();
		line1.setItemName("Apple");
		line1.setUnitPrices(3.0);
		line1.setUnits(12);
		order.add(line1);
		
		OrderLine line2 = new OrderLine();
		line2.setItemName("Strawberry");
		line2.setUnitPrices(12.3);
		line2.setUnits(5);
		order.add(line2);
		
		order = new FooterDecorator(new HeaderDecorator(order));
		order.print();
		
	}

}
